package com.itheima.mapper;

import com.itheima.entity.pojo.Setmeal;
import com.itheima.entity.vo.setmeal.SetmealByIdVo;
import com.itheima.entity.vo.setmeal.SetmealPageLVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author huangzelnag
 * @create 2022-05-11
 */
@Mapper
public interface SetmealMapper {

    Boolean update(Setmeal setmeal);



    Boolean insert(Setmeal setmeal);

    Integer  selectCountByName(String name);
    List<SetmealPageLVo> selectPage(String name, Integer page, Integer pageSize);



    SetmealByIdVo selectById(String id);


    Boolean selectName(String name);



    Boolean selectSetmealStatus(String id);


    Boolean deleteById(@Param("ids") String[] ids);

    Boolean updateStatusArray(@Param("status") Integer status,
                              @Param("idArry") String[] idArry,
                              @Param("currentId") String currentId,
                              @Param("date") Date date);

    Integer selectByCategoryId(String id);

    List<Setmeal> selectList(String categoryId, String status);
}
